package com.nit.bike.service.basic;

import com.nit.bike.dto.basic.UserDTO;
import com.nit.bike.dto.utils.TableReqDTO;
import com.nit.bike.dto.utils.TableRspDTO;


public interface UserService {
    /**
     * 获取表格数据
     */
    TableRspDTO list4Table(TableReqDTO req) throws Exception;

    /**
     * 新增记录
     */
    Integer add(UserDTO userDTO) throws Exception;

    /**
     * 更新基本信息
     */
    Integer updateBasicInfo(UserDTO userDTO) throws Exception;

    /**
     * 更新记录
     */
    Integer update(UserDTO userDTO) throws Exception;

    /**
     * 修改用户状态
     */
    Integer updateState(String userIds, Integer state) throws Exception;

    /**
     * 修改当前骑行记录
     */
    void updateRideId(Long userId, Long rideId) throws Exception;

    /**
     * 重置用户密码
     */
    Integer resetPwd(Long userId, String loginPwd) throws Exception;

    /**
     * 登录验证
     */
    UserDTO loginCheck(String loginName) throws Exception;

    /**
     * 根据userId获取用户信息
     */
    UserDTO getByUserId(Long userId) throws Exception;

    /**
     * 更新用户租借卡id
     */
    Integer updateCardId(Long userId, Long cardId) throws Exception;

    /**
     * 根据cardId获取用户信息
     */
    UserDTO getByCardId(Long cardId) throws Exception;
}
